package com.lyf.scm.plan.domain.remote.stock;

import com.lyf.scm.plan.domain.remote.stock.dto.QueryRealTimeStockDTO;
import com.lyf.scm.plan.domain.remote.stock.dto.RealTimeStockDTO;
import com.lyf.scm.plan.domain.remote.stock.dto.RealWarehouse;
import com.lyf.scm.plan.domain.remote.stock.dto.RealWarehouseParamDTO;
import com.rome.arch.core.clientobject.Response;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * description:
 *
 * @author: haodong
 * @data: 2020/9/8 14:48
 */
@FeignClient(name = "STOCK-CORE-SERVICE")
public interface StockCoreRemote {


    /**
     * 根据条件查询实仓信息-运营平台查询接口,不分页
     *
     * @param realWarehouseParamDTO 实际仓库参数dto
     * @return {@link Response<List<RealWarehouse>>}
     */
    @PostMapping("/stock/real_warehouse/queryForAdmin")
    Response<List<RealWarehouse>> queryForAdmin(@RequestBody RealWarehouseParamDTO realWarehouseParamDTO);

    /**
     * 查询实时库存
     *
     * @param queryRealTimeStockDTO 实时查询股票dto
     * @return {@link Response<List<RealTimeStockDTO>>}
     */
    @PostMapping("/stock/v1/stock_plan/list/availableQty")
    Response<List<RealTimeStockDTO>> listAvailableQty(@RequestBody QueryRealTimeStockDTO queryRealTimeStockDTO);

}
